'use strict';

/** @type {LH.Config.Json} */
const config = {
  extends: 'lighthouse:default',
  settings: {
    maxWaitForLoad: 35 * 1000,
    emulatedFormFactor: 'desktop',
    throttling: {
    },
    onlyCategories: ['performance']
  },
  audits: [
    // 75th and 95th percentiles -> median and PODR
    // SELECT QUANTILES(renderStart, 21) FROM [httparchive:summary_pages.2018_12_15_desktop] LIMIT 1000
    {path: 'metrics/first-contentful-paint', options: {scorePODR: 800, scoreMedian: 1600}},
    {path: 'metrics/first-meaningful-paint', options: {scorePODR: 800, scoreMedian: 1600}},
    // 75th and 95th percentiles -> median and PODR
    // SELECT QUANTILES(SpeedIndex, 21) FROM [httparchive:summary_pages.2018_12_15_desktop] LIMIT 1000
    {path: 'metrics/speed-index', options: {scorePODR: 1100, scoreMedian: 2300}},
    // 75th and 95th percentiles -> median and PODR
    // SELECT QUANTILES(fullyLoaded, 21) FROM [httparchive:summary_pages.2018_12_15_desktop] LIMIT 1000
    {path: 'metrics/interactive', options: {scorePODR: 2000, scoreMedian: 4500}},
    {path: 'metrics/first-cpu-idle', options: {scorePODR: 2000, scoreMedian: 4500}},
  ],
};

module.exports = config;
